package com.common.convert;

import com.common.convert.param.FormatParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jodconverter.core.document.DocumentFormat;

import java.util.List;

/**
 * @author lxw
 */
@Data
@AllArgsConstructor
@EqualsAndHashCode
public class FormatSupport {

    private String fromFormat;

    private String toFormat;

    public FormatSupport(DocumentFormat fromFormat, DocumentFormat toFormat) {
        this.fromFormat = fromFormat.getExtensions().get(0);
        this.toFormat = toFormat.getExtensions().get(0);
    }

    public FormatSupport(String fromFormat, String toFormat) {
        this.fromFormat = fromFormat;
        this.toFormat = toFormat;
    }


    List<FormatParam> formatParams;

}
